import com.spring.dao.Hello;
        import org.junit.Test;
        import org.springframework.context.ApplicationContext;
        import org.springframework.context.support.ClassPathXmlApplicationContext;

public class Mytext {

    public static void main(String[] args) {
        //获取Spring上下文的对象
        ApplicationContext context = new ClassPathXmlApplicationContext("beans.xml");
        //我们的对象现在都在Spring中，我们要使用，直接去取
        Hello hello = (Hello) context.getBean("hello");
        System.out.println(hello.toString());
    }

}
